

 $(window).scroll(function(){
   $(this).scrollTop() >1?$('.go-top').show(): $('.go-top').hide();       
});

$(".go-top").click(function(event){		
	event.preventDefault();
	$('html,body').animate({scrollTop:$(this.hash).offset().top},600);
});

/*留言*/
$(".messge_nav").click(function () {
    $(".message_content").slideToggle();
});

//產品導航
$(".adv .nav-tabs li").last().css("border","none");
$(".product_nav li:eq(0)").find("a").eq(0).addClass("active");
$(".product_nav li:eq(1)").find("a").eq(0).addClass("active");
$(".product_nav li a").click(function(){
    $(this).siblings().removeClass("active");
    $(this).addClass("active");
    var t_val = $(this).text();
    alert(t_val);
});
   
     //輪播
            var swiper1 = new Swiper('.swiper1', {
            pagination:'.swiper-pagination1',
            paginationClickable: true,
            spaceBetween: 30,
            slidesPerView: 1, 
            slidesPerColumn: 1,  
            nextButton: '.swiper-button-next1',
            prevButton: '.swiper-button-prev1'
    });
    var swiper2 = new Swiper('.swiper2', {
            pagination: '.swiper-pagination2',
            paginationClickable: true,
            spaceBetween: 30,
            slidesPerView: 1, 
            slidesPerColumn: 1,  
            nextButton: '.swiper-button-next2',
            prevButton: '.swiper-button-prev2'
    });